#!/usr/bin/python3
# -*- coding: utf-8 -*-
 
import sys
from PyQt5.QtWidgets import QApplication, QWidget,QMainWindow,QFileDialog
from PyQt5.QtGui import QIcon
import midiPlay
 
class myWindow(QMainWindow, midiPlay.Ui_MainWindow):
    def __init__(self):
        super().__init__()
        super().setupUi(self)

        self.BtnSelectMidi.clicked.connect(self.BtnSelectCb)

    def BtnSelectCb(self):
        fileName = QFileDialog.getOpenFileName()
        print(fileName)
        self.LabMidiSelected.setText(fileName[0][-25:-1])

    def BtnPlayCb(self):
        pass

        
if __name__ == '__main__':
    #创建应用程序和对象
    app = QApplication(sys.argv)
    ex = myWindow()
    ex.show()
    sys.exit(app.exec_()) 